<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用户信息详情')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-edit" th:object="${openaiUserInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">用户id：</label>
                <div class="col-sm-8">
                    <input name="userId" th:field="*{userId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">companyId：</label>
                <div class="col-sm-8">
                    <input name="companyId" th:field="*{companyId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">3.5每天免费次数：</label>
                <div class="col-sm-8">
                    <input name="freeTime" th:field="*{freeTime}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">3.5每天充值次数：</label>
                <div class="col-sm-8">
                    <input name="moneyTime" th:field="*{moneyTime}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">3.5充值时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="rechargeTime" th:value="${#dates.format(openaiUserInfo.rechargeTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">3.5到期时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="expirationTime" th:value="${#dates.format(openaiUserInfo.expirationTime, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label is-required">4.0每天充值次数：</label>
                <div class="col-sm-8">
                    <input name="moneyTimeFour" th:field="*{moneyTimeFour}" class="form-control" type="text" required>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-3 control-label">4.0充值时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="rechargeTimeFour" th:value="${#dates.format(openaiUserInfo.rechargeTimeFour, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">4.0到期时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="expirationTimeFour" th:value="${#dates.format(openaiUserInfo.expirationTimeFour, 'yyyy-MM-dd HH:mm:ss')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>

        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/info";
        $("#form-info-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-info-edit').serialize());
            }
        }

        $("input[name='rechargeTime']").datetimepicker({
            format: "yyyy-mm-dd HH:mm:ss",
            minView: "month",
            autoclose: true
        });

        $("input[name='expirationTime']").datetimepicker({
            format: "yyyy-mm-dd HH:mm:ss",
            minView: "month",
            autoclose: true
        });

        $("input[name='rechargeTimeFour']").datetimepicker({
            format: "yyyy-mm-dd HH:mm:ss",
            minView: "month",
            autoclose: true
        });

        $("input[name='expirationTimeFour']").datetimepicker({
            format: "yyyy-mm-dd HH:mm:ss",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>